Option Explicit On 
Option Strict On

Imports System
Imports Microsoft.VisualBasic.ControlChars

Public Class frmPlanar
    Inherits System.Windows.Forms.Form
    Public Shared bUpdate As Boolean
    Public Shared oPlanar As New PlanarClass
    'this is a collection of local copies of values in the oPlanar object
    'if don't use local copies, then changes are made even when Cancel button is pressed by user
    Private Shared bMapProj As Boolean
    Private Shared bGridSys As Boolean
    Private Shared bLocalP As Boolean
    Private Shared bCoord As Boolean
    Private Shared bBearing As Boolean
    Private Shared sEncode As String = ""
    Private Shared sPvalues(29) As String
    'bMapChange and bGridChange are used to track changes in Map or Grid system selected
    'when a change occurs, the variable is set to true and the user cannot exit using OK
    'the Boolean is reset to false when the parameters associated with the new system have
    'been successfully updated (by clicking on the Edit Parameters button)
    Private Shared bMapChange As Boolean = False
    Private Shared bGridChange As Boolean = False
    Friend WithEvents btnCancel1 As System.Windows.Forms.Button
    Friend WithEvents btnOK1 As System.Windows.Forms.Button
    Friend WithEvents button_example As System.Windows.Forms.Button
    Friend WithEvents Button1 As System.Windows.Forms.Button
    Private Shared bLoad As Boolean = False 'only true when in the Load routine


#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call
        oPlanar = New PlanarClass
    End Sub

    Public Sub New(ByVal indexPlanar As Integer)
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call
        oPlanar = New PlanarClass
        oPlanar = CType(frmMetaMain.cPlanar(indexPlanar), PlanarClass)
    End Sub

    Public Sub New(ByVal inPlanar As PlanarClass)
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call
        oPlanar = New PlanarClass
        oPlanar = inPlanar
    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Friend WithEvents ToolTip1 As System.Windows.Forms.ToolTip
    Friend WithEvents TabControl1 As System.Windows.Forms.TabControl
    Friend WithEvents TabPage1 As System.Windows.Forms.TabPage
    Friend WithEvents TabPage2 As System.Windows.Forms.TabPage
    Friend WithEvents pnlLocal As System.Windows.Forms.Panel
    Friend WithEvents txtGeoRef As System.Windows.Forms.TextBox
    Friend WithEvents Label6 As System.Windows.Forms.Label
    Friend WithEvents txtLocalDesc As System.Windows.Forms.TextBox
    Friend WithEvents Label5 As System.Windows.Forms.Label
    Friend WithEvents Label4 As System.Windows.Forms.Label
    Friend WithEvents pnlGrid As System.Windows.Forms.Panel
    Friend WithEvents btnGrid As System.Windows.Forms.Button
    Friend WithEvents cboxGrid As System.Windows.Forms.ComboBox
    Friend WithEvents Label3 As System.Windows.Forms.Label
    Friend WithEvents pnlMap As System.Windows.Forms.Panel
    Friend WithEvents btnMap As System.Windows.Forms.Button
    Friend WithEvents cboxMap As System.Windows.Forms.ComboBox
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents pnlSystem As System.Windows.Forms.Panel
    Friend WithEvents rdoLocal As System.Windows.Forms.RadioButton
    Friend WithEvents rdoGrid As System.Windows.Forms.RadioButton
    Friend WithEvents rdoMap As System.Windows.Forms.RadioButton
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents ImageList1 As System.Windows.Forms.ImageList
    Friend WithEvents btnOK As System.Windows.Forms.Button
    Friend WithEvents btnCancel As System.Windows.Forms.Button
    Friend WithEvents pnlBearing As System.Windows.Forms.Panel
    Friend WithEvents cboxMerid As System.Windows.Forms.ComboBox
    Friend WithEvents Label16 As System.Windows.Forms.Label
    Friend WithEvents cboxBearDir As System.Windows.Forms.ComboBox
    Friend WithEvents Label15 As System.Windows.Forms.Label
    Friend WithEvents cboxBearUnits As System.Windows.Forms.ComboBox
    Friend WithEvents Label14 As System.Windows.Forms.Label
    Friend WithEvents Label11 As System.Windows.Forms.Label
    Friend WithEvents cboxPlanUnits As System.Windows.Forms.ComboBox
    Friend WithEvents Label9 As System.Windows.Forms.Label
    Friend WithEvents cboxEncode As System.Windows.Forms.ComboBox
    Friend WithEvents Label8 As System.Windows.Forms.Label
    Friend WithEvents Label17 As System.Windows.Forms.Label
    Friend WithEvents numYRes As System.Windows.Forms.NumericUpDown
    Friend WithEvents Label13 As System.Windows.Forms.Label
    Friend WithEvents numXRes As System.Windows.Forms.NumericUpDown
    Friend WithEvents Label12 As System.Windows.Forms.Label
    Friend WithEvents numBearRes As System.Windows.Forms.NumericUpDown
    Friend WithEvents Label18 As System.Windows.Forms.Label
    Friend WithEvents numDistRes As System.Windows.Forms.NumericUpDown
    Friend WithEvents Label19 As System.Windows.Forms.Label
    Friend WithEvents pnlCoord As System.Windows.Forms.Panel
    Friend WithEvents Label20 As System.Windows.Forms.Label
    Friend WithEvents lboxGrid As System.Windows.Forms.ListBox
    Friend WithEvents btnAddMap As System.Windows.Forms.Button
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container
        Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmPlanar))
        Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
        Me.txtGeoRef = New System.Windows.Forms.TextBox
        Me.txtLocalDesc = New System.Windows.Forms.TextBox
        Me.lboxGrid = New System.Windows.Forms.ListBox
        Me.pnlCoord = New System.Windows.Forms.Panel
        Me.numYRes = New System.Windows.Forms.NumericUpDown
        Me.Label13 = New System.Windows.Forms.Label
        Me.numXRes = New System.Windows.Forms.NumericUpDown
        Me.Label12 = New System.Windows.Forms.Label
        Me.Label17 = New System.Windows.Forms.Label
        Me.pnlBearing = New System.Windows.Forms.Panel
        Me.numBearRes = New System.Windows.Forms.NumericUpDown
        Me.Label18 = New System.Windows.Forms.Label
        Me.numDistRes = New System.Windows.Forms.NumericUpDown
        Me.Label19 = New System.Windows.Forms.Label
        Me.cboxMerid = New System.Windows.Forms.ComboBox
        Me.Label16 = New System.Windows.Forms.Label
        Me.cboxBearDir = New System.Windows.Forms.ComboBox
        Me.Label15 = New System.Windows.Forms.Label
        Me.cboxBearUnits = New System.Windows.Forms.ComboBox
        Me.Label14 = New System.Windows.Forms.Label
        Me.Label11 = New System.Windows.Forms.Label
        Me.cboxPlanUnits = New System.Windows.Forms.ComboBox
        Me.cboxEncode = New System.Windows.Forms.ComboBox
        Me.TabControl1 = New System.Windows.Forms.TabControl
        Me.TabPage1 = New System.Windows.Forms.TabPage
        Me.button_example = New System.Windows.Forms.Button
        Me.btnCancel = New System.Windows.Forms.Button
        Me.btnOK = New System.Windows.Forms.Button
        Me.pnlLocal = New System.Windows.Forms.Panel
        Me.Label6 = New System.Windows.Forms.Label
        Me.Label5 = New System.Windows.Forms.Label
        Me.Label4 = New System.Windows.Forms.Label
        Me.pnlGrid = New System.Windows.Forms.Panel
        Me.Label20 = New System.Windows.Forms.Label
        Me.btnGrid = New System.Windows.Forms.Button
        Me.cboxGrid = New System.Windows.Forms.ComboBox
        Me.Label3 = New System.Windows.Forms.Label
        Me.pnlMap = New System.Windows.Forms.Panel
        Me.btnAddMap = New System.Windows.Forms.Button
        Me.btnMap = New System.Windows.Forms.Button
        Me.cboxMap = New System.Windows.Forms.ComboBox
        Me.Label2 = New System.Windows.Forms.Label
        Me.pnlSystem = New System.Windows.Forms.Panel
        Me.rdoLocal = New System.Windows.Forms.RadioButton
        Me.rdoGrid = New System.Windows.Forms.RadioButton
        Me.rdoMap = New System.Windows.Forms.RadioButton
        Me.Label1 = New System.Windows.Forms.Label
        Me.TabPage2 = New System.Windows.Forms.TabPage
        Me.Button1 = New System.Windows.Forms.Button
        Me.btnCancel1 = New System.Windows.Forms.Button
        Me.btnOK1 = New System.Windows.Forms.Button
        Me.Label9 = New System.Windows.Forms.Label
        Me.Label8 = New System.Windows.Forms.Label
        Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components)
        Me.pnlCoord.SuspendLayout()
        CType(Me.numYRes, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.numXRes, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.pnlBearing.SuspendLayout()
        CType(Me.numBearRes, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.numDistRes, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.TabControl1.SuspendLayout()
        Me.TabPage1.SuspendLayout()
        Me.pnlLocal.SuspendLayout()
        Me.pnlGrid.SuspendLayout()
        Me.pnlMap.SuspendLayout()
        Me.pnlSystem.SuspendLayout()
        Me.TabPage2.SuspendLayout()
        Me.SuspendLayout()
        '
        'ToolTip1
        '
        Me.ToolTip1.IsBalloon = True
        Me.ToolTip1.ShowAlways = True
        Me.ToolTip1.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info
        '
        'txtGeoRef
        '
        Me.txtGeoRef.AcceptsReturn = True
        Me.txtGeoRef.Location = New System.Drawing.Point(8, 160)
        Me.txtGeoRef.Multiline = True
        Me.txtGeoRef.Name = "txtGeoRef"
        Me.txtGeoRef.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
        Me.txtGeoRef.Size = New System.Drawing.Size(270, 75)
        Me.txtGeoRef.TabIndex = 5
        Me.ToolTip1.SetToolTip(Me.txtGeoRef, "a description of the information provided to register the local planar system to " & _
                "the Earth" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "(e.g. control points, satellite ephemeral data, inertial navigation d" & _
                "ata)." & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10))
        '
        'txtLocalDesc
        '
        Me.txtLocalDesc.AcceptsReturn = True
        Me.txtLocalDesc.Location = New System.Drawing.Point(8, 48)
        Me.txtLocalDesc.Multiline = True
        Me.txtLocalDesc.Name = "txtLocalDesc"
        Me.txtLocalDesc.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
        Me.txtLocalDesc.Size = New System.Drawing.Size(270, 75)
        Me.txtLocalDesc.TabIndex = 3
        Me.ToolTip1.SetToolTip(Me.txtLocalDesc, "a description of the local planar system. ")
        '
        'lboxGrid
        '
        Me.lboxGrid.Location = New System.Drawing.Point(75, 56)
        Me.lboxGrid.Name = "lboxGrid"
        Me.lboxGrid.Size = New System.Drawing.Size(149, 82)
        Me.lboxGrid.TabIndex = 5
        Me.ToolTip1.SetToolTip(Me.lboxGrid, "select a projection if options are presented")
        '
        'pnlCoord
        '
        Me.pnlCoord.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.pnlCoord.Controls.Add(Me.numYRes)
        Me.pnlCoord.Controls.Add(Me.Label13)
        Me.pnlCoord.Controls.Add(Me.numXRes)
        Me.pnlCoord.Controls.Add(Me.Label12)
        Me.pnlCoord.Controls.Add(Me.Label17)
        Me.pnlCoord.Location = New System.Drawing.Point(21, 82)
        Me.pnlCoord.Name = "pnlCoord"
        Me.pnlCoord.Size = New System.Drawing.Size(301, 74)
        Me.pnlCoord.TabIndex = 16
        Me.ToolTip1.SetToolTip(Me.pnlCoord, "the method of encoding the position of a point" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "by measuring its distance from pe" & _
                "rpendicular reference axes" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "(the ""coordinate pair"" and ""row and column"" methods)" & _
                ". ")
        '
        'numYRes
        '
        Me.numYRes.DecimalPlaces = 2
        Me.numYRes.Location = New System.Drawing.Point(147, 43)
        Me.numYRes.Maximum = New Decimal(New Integer() {100000, 0, 0, 0})
        Me.numYRes.Name = "numYRes"
        Me.numYRes.Size = New System.Drawing.Size(104, 20)
        Me.numYRes.TabIndex = 8
        Me.numYRes.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        Me.ToolTip1.SetToolTip(Me.numYRes, "the (nominal) minimum distance between the ""y"" or row values of two adjacent poin" & _
                "ts," & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "expressed in Planar Distance Units of measure." & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "    Domain: Ordinate Resolu" & _
                "tion > 0.0 ")
        '
        'Label13
        '
        Me.Label13.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label13.Location = New System.Drawing.Point(144, 24)
        Me.Label13.Name = "Label13"
        Me.Label13.Size = New System.Drawing.Size(120, 16)
        Me.Label13.TabIndex = 7
        Me.Label13.Text = "Ordinate Resolution"
        Me.ToolTip1.SetToolTip(Me.Label13, "the (nominal) minimum distance between the ""y"" or row values of two adjacent poin" & _
                "ts," & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "expressed in Planar Distance Units of measure." & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "    Domain: Ordinate Resolu" & _
                "tion > 0.0 " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10))
        '
        'numXRes
        '
        Me.numXRes.DecimalPlaces = 2
        Me.numXRes.Location = New System.Drawing.Point(11, 43)
        Me.numXRes.Maximum = New Decimal(New Integer() {100000, 0, 0, 0})
        Me.numXRes.Name = "numXRes"
        Me.numXRes.Size = New System.Drawing.Size(104, 20)
        Me.numXRes.TabIndex = 6
        Me.numXRes.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        Me.ToolTip1.SetToolTip(Me.numXRes, "the (nominal) minimum distance between the ""x"" or column values of two adjacent p" & _
                "oints," & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "expressed in Planar Distance Units of measure." & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "    Domain: Abscissa Res" & _
                "olution > 0.0 ")
        '
        'Label12
        '
        Me.Label12.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label12.Location = New System.Drawing.Point(8, 24)
        Me.Label12.Name = "Label12"
        Me.Label12.Size = New System.Drawing.Size(130, 16)
        Me.Label12.TabIndex = 5
        Me.Label12.Text = "Abscissa Resolution"
        Me.ToolTip1.SetToolTip(Me.Label12, "the (nominal) minimum distance between the ""x"" or column values of two adjacent p" & _
                "oints," & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "expressed in Planar Distance Units of measure." & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "    Domain: Abscissa Res" & _
                "olution > 0.0 " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10))
        '
        'Label17
        '
        Me.Label17.Dock = System.Windows.Forms.DockStyle.Top
        Me.Label17.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label17.Location = New System.Drawing.Point(0, 0)
        Me.Label17.Name = "Label17"
        Me.Label17.Size = New System.Drawing.Size(297, 24)
        Me.Label17.TabIndex = 1
        Me.Label17.Text = "Coordinate Representation"
        Me.Label17.TextAlign = System.Drawing.ContentAlignment.TopCenter
        Me.ToolTip1.SetToolTip(Me.Label17, "the method of encoding the position of a point" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "by measuring its distance from pe" & _
                "rpendicular reference axes" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "(the ""coordinate pair"" and ""row and column"" methods)" & _
                ". ")
        '
        'pnlBearing
        '
        Me.pnlBearing.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.pnlBearing.Controls.Add(Me.numBearRes)
        Me.pnlBearing.Controls.Add(Me.Label18)
        Me.pnlBearing.Controls.Add(Me.numDistRes)
        Me.pnlBearing.Controls.Add(Me.Label19)
        Me.pnlBearing.Controls.Add(Me.cboxMerid)
        Me.pnlBearing.Controls.Add(Me.Label16)
        Me.pnlBearing.Controls.Add(Me.cboxBearDir)
        Me.pnlBearing.Controls.Add(Me.Label15)
        Me.pnlBearing.Controls.Add(Me.cboxBearUnits)
        Me.pnlBearing.Controls.Add(Me.Label14)
        Me.pnlBearing.Controls.Add(Me.Label11)
        Me.pnlBearing.Location = New System.Drawing.Point(21, 162)
        Me.pnlBearing.Name = "pnlBearing"
        Me.pnlBearing.Size = New System.Drawing.Size(351, 183)
        Me.pnlBearing.TabIndex = 15
        Me.ToolTip1.SetToolTip(Me.pnlBearing, "a method of encoding the position of a point by measuring its distance and" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "direc" & _
                "tion (azimuth angle) from another point. ")
        '
        'numBearRes
        '
        Me.numBearRes.DecimalPlaces = 2
        Me.numBearRes.Location = New System.Drawing.Point(11, 112)
        Me.numBearRes.Maximum = New Decimal(New Integer() {100000, 0, 0, 0})
        Me.numBearRes.Name = "numBearRes"
        Me.numBearRes.Size = New System.Drawing.Size(104, 20)
        Me.numBearRes.TabIndex = 8
        Me.numBearRes.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        Me.ToolTip1.SetToolTip(Me.numBearRes, "the minimum angle measurable between two points," & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "expressed in Bearing Units of m" & _
                "easure." & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "    Domain: Bearing Resolution > 0.0 ")
        '
        'Label18
        '
        Me.Label18.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label18.Location = New System.Drawing.Point(8, 93)
        Me.Label18.Name = "Label18"
        Me.Label18.Size = New System.Drawing.Size(120, 16)
        Me.Label18.TabIndex = 13
        Me.Label18.Text = "Bearing Resolution"
        Me.ToolTip1.SetToolTip(Me.Label18, "the minimum angle measurable between two points," & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "expressed in Bearing Units of m" & _
                "easure." & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "    Domain: Bearing Resolution > 0.0 " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10))
        '
        'numDistRes
        '
        Me.numDistRes.DecimalPlaces = 2
        Me.numDistRes.Location = New System.Drawing.Point(11, 56)
        Me.numDistRes.Maximum = New Decimal(New Integer() {100000, 0, 0, 0})
        Me.numDistRes.Name = "numDistRes"
        Me.numDistRes.Size = New System.Drawing.Size(104, 20)
        Me.numDistRes.TabIndex = 6
        Me.numDistRes.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        Me.ToolTip1.SetToolTip(Me.numDistRes, "the minimum distance measurable between two points," & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "expressed Planar Distance Un" & _
                "its of measure." & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "    Domain: Distance Resolution > 0.0")
        '
        'Label19
        '
        Me.Label19.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label19.Location = New System.Drawing.Point(8, 37)
        Me.Label19.Name = "Label19"
        Me.Label19.Size = New System.Drawing.Size(120, 16)
        Me.Label19.TabIndex = 11
        Me.Label19.Text = "Distance Resolution"
        Me.ToolTip1.SetToolTip(Me.Label19, "the minimum distance measurable between two points," & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "expressed Planar Distance Un" & _
                "its of measure." & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "    Domain: Distance Resolution > 0.0")
        '
        'cboxMerid
        '
        Me.cboxMerid.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cboxMerid.Items.AddRange(New Object() {"Assumed", "Grid", "Magnetic", "Astronomic", "Geodetic"})
        Me.cboxMerid.Location = New System.Drawing.Point(147, 111)
        Me.cboxMerid.Name = "cboxMerid"
        Me.cboxMerid.Size = New System.Drawing.Size(160, 21)
        Me.cboxMerid.TabIndex = 12
        Me.ToolTip1.SetToolTip(Me.cboxMerid, "axis from which the bearing is measured." & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "    Domain: ""Assumed"" ""Grid"" ""Magnetic""" & _
                " ""Astronomic"" ""Geodetic"" ")
        '
        'Label16
        '
        Me.Label16.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label16.Location = New System.Drawing.Point(144, 93)
        Me.Label16.Name = "Label16"
        Me.Label16.Size = New System.Drawing.Size(168, 16)
        Me.Label16.TabIndex = 9
        Me.Label16.Text = "Bearing Reference Meridian"
        Me.ToolTip1.SetToolTip(Me.Label16, "axis from which the bearing is measured." & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "    Domain: ""Assumed"" ""Grid"" ""Magnetic""" & _
                " ""Astronomic"" ""Geodetic"" " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10))
        '
        'cboxBearDir
        '
        Me.cboxBearDir.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cboxBearDir.Items.AddRange(New Object() {"North", "South"})
        Me.cboxBearDir.Location = New System.Drawing.Point(147, 55)
        Me.cboxBearDir.Name = "cboxBearDir"
        Me.cboxBearDir.Size = New System.Drawing.Size(160, 21)
        Me.cboxBearDir.TabIndex = 10
        Me.ToolTip1.SetToolTip(Me.cboxBearDir, "direction from which the bearing is measured." & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "    Domain: ""North"" ""South"" ")
        '
        'Label15
        '
        Me.Label15.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label15.Location = New System.Drawing.Point(144, 37)
        Me.Label15.Name = "Label15"
        Me.Label15.Size = New System.Drawing.Size(168, 16)
        Me.Label15.TabIndex = 7
        Me.Label15.Text = "Bearing Reference Direction"
        Me.ToolTip1.SetToolTip(Me.Label15, "direction from which the bearing is measured." & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "    Domain: ""North"" ""South"" " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10))
        '
        'cboxBearUnits
        '
        Me.cboxBearUnits.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cboxBearUnits.Items.AddRange(New Object() {"Decimal degrees", "Decimal minutes", "Decimal seconds", "Degrees and decimal minutes", "Degrees, minutes, and decimal seconds", "Radians", "Grads"})
        Me.cboxBearUnits.Location = New System.Drawing.Point(92, 146)
        Me.cboxBearUnits.Name = "cboxBearUnits"
        Me.cboxBearUnits.Size = New System.Drawing.Size(240, 21)
        Me.cboxBearUnits.TabIndex = 14
        Me.ToolTip1.SetToolTip(Me.cboxBearUnits, "units of measure used for angles. ")
        '
        'Label14
        '
        Me.Label14.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label14.Location = New System.Drawing.Point(8, 149)
        Me.Label14.Name = "Label14"
        Me.Label14.Size = New System.Drawing.Size(104, 16)
        Me.Label14.TabIndex = 5
        Me.Label14.Text = "Bearing Units"
        Me.ToolTip1.SetToolTip(Me.Label14, "units of measure used for angles. ")
        '
        'Label11
        '
        Me.Label11.Dock = System.Windows.Forms.DockStyle.Top
        Me.Label11.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label11.Location = New System.Drawing.Point(0, 0)
        Me.Label11.Name = "Label11"
        Me.Label11.Size = New System.Drawing.Size(347, 24)
        Me.Label11.TabIndex = 0
        Me.Label11.Text = "Distance and Bearing Representation"
        Me.Label11.TextAlign = System.Drawing.ContentAlignment.TopCenter
        Me.ToolTip1.SetToolTip(Me.Label11, "a method of encoding the position of a point by measuring its distance and" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "direc" & _
                "tion (azimuth angle) from another point. ")
        '
        'cboxPlanUnits
        '
        Me.cboxPlanUnits.Items.AddRange(New Object() {"meters", "international feet", "survey feet"})
        Me.cboxPlanUnits.Location = New System.Drawing.Point(154, 55)
        Me.cboxPlanUnits.Name = "cboxPlanUnits"
        Me.cboxPlanUnits.Size = New System.Drawing.Size(168, 21)
        Me.cboxPlanUnits.TabIndex = 12
        Me.ToolTip1.SetToolTip(Me.cboxPlanUnits, "units of measure used for distances." & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "    Domain: ""meters"" ""international feet"" """ & _
                "survey feet"" free text ")
        '
        'cboxEncode
        '
        Me.cboxEncode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cboxEncode.Items.AddRange(New Object() {"coordinate pair", "distance and bearing", "row and column"})
        Me.cboxEncode.Location = New System.Drawing.Point(154, 16)
        Me.cboxEncode.Name = "cboxEncode"
        Me.cboxEncode.Size = New System.Drawing.Size(168, 21)
        Me.cboxEncode.TabIndex = 10
        Me.ToolTip1.SetToolTip(Me.cboxEncode, "the means used to represent horizontal positions." & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "values: ""coordinate pair"", ""di" & _
                "stance and bearing"", ""row and column""")
        '
        'TabControl1
        '
        Me.TabControl1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
                    Or System.Windows.Forms.AnchorStyles.Left) _
                    Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.TabControl1.Controls.Add(Me.TabPage1)
        Me.TabControl1.Controls.Add(Me.TabPage2)
        Me.TabControl1.ImageList = Me.ImageList1
        Me.TabControl1.Location = New System.Drawing.Point(0, 2)
        Me.TabControl1.Name = "TabControl1"
        Me.TabControl1.SelectedIndex = 0
        Me.TabControl1.Size = New System.Drawing.Size(591, 412)
        Me.TabControl1.TabIndex = 0
        Me.ToolTip1.SetToolTip(Me.TabControl1, "information about the coordinate system developed on the planar surface. ")
        '
        'TabPage1
        '
        Me.TabPage1.AutoScroll = True
        Me.TabPage1.Controls.Add(Me.button_example)
        Me.TabPage1.Controls.Add(Me.btnCancel)
        Me.TabPage1.Controls.Add(Me.btnOK)
        Me.TabPage1.Controls.Add(Me.pnlLocal)
        Me.TabPage1.Controls.Add(Me.pnlGrid)
        Me.TabPage1.Controls.Add(Me.pnlMap)
        Me.TabPage1.Controls.Add(Me.pnlSystem)
        Me.TabPage1.Controls.Add(Me.Label1)
        Me.TabPage1.ImageIndex = 0
        Me.TabPage1.Location = New System.Drawing.Point(4, 23)
        Me.TabPage1.Name = "TabPage1"
        Me.TabPage1.Size = New System.Drawing.Size(583, 385)
        Me.TabPage1.TabIndex = 0
        Me.TabPage1.Text = "Coordinate System"
        '
        'button_example
        '
        Me.button_example.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.button_example.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.button_example.Image = Global.MetaDoc.My.Resources.Resources.app_help_48x48
        Me.button_example.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
        Me.button_example.Location = New System.Drawing.Point(465, 3)
        Me.button_example.Name = "button_example"
        Me.button_example.Size = New System.Drawing.Size(110, 48)
        Me.button_example.TabIndex = 21
        Me.button_example.Text = "EXAMPLE"
        Me.button_example.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        Me.button_example.UseVisualStyleBackColor = True
        '
        'btnCancel
        '
        Me.btnCancel.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.btnCancel.Image = Global.MetaDoc.My.Resources.Resources.Cancel_16x16
        Me.btnCancel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
        Me.btnCancel.Location = New System.Drawing.Point(481, 345)
        Me.btnCancel.Name = "btnCancel"
        Me.btnCancel.Size = New System.Drawing.Size(75, 23)
        Me.btnCancel.TabIndex = 13
        Me.btnCancel.Text = "Cancel"
        Me.btnCancel.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'btnOK
        '
        Me.btnOK.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.btnOK.Image = Global.MetaDoc.My.Resources.Resources.Ok_16x16
        Me.btnOK.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
        Me.btnOK.Location = New System.Drawing.Point(400, 345)
        Me.btnOK.Name = "btnOK"
        Me.btnOK.Size = New System.Drawing.Size(75, 23)
        Me.btnOK.TabIndex = 12
        Me.btnOK.Text = "OK"
        Me.btnOK.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'pnlLocal
        '
        Me.pnlLocal.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.pnlLocal.Controls.Add(Me.txtGeoRef)
        Me.pnlLocal.Controls.Add(Me.Label6)
        Me.pnlLocal.Controls.Add(Me.txtLocalDesc)
        Me.pnlLocal.Controls.Add(Me.Label5)
        Me.pnlLocal.Controls.Add(Me.Label4)
        Me.pnlLocal.Location = New System.Drawing.Point(267, 62)
        Me.pnlLocal.Name = "pnlLocal"
        Me.pnlLocal.Size = New System.Drawing.Size(289, 277)
        Me.pnlLocal.TabIndex = 10
        Me.ToolTip1.SetToolTip(Me.pnlLocal, "any right-handed planar coordinate system of which the z-axis coincides with a pl" & _
                "umb line through the origin that locally is aligned with the surface of the Eart" & _
                "h. ")
        '
        'Label6
        '
        Me.Label6.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label6.Location = New System.Drawing.Point(8, 144)
        Me.Label6.Name = "Label6"
        Me.Label6.Size = New System.Drawing.Size(232, 23)
        Me.Label6.TabIndex = 4
        Me.Label6.Text = "Local Planar Georeference Information"
        Me.ToolTip1.SetToolTip(Me.Label6, "a description of the information provided to register the local planar system to " & _
                "the Earth" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "(e.g. control points, satellite ephemeral data, inertial navigation d" & _
                "ata)." & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10))
        '
        'Label5
        '
        Me.Label5.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label5.Location = New System.Drawing.Point(8, 32)
        Me.Label5.Name = "Label5"
        Me.Label5.Size = New System.Drawing.Size(144, 23)
        Me.Label5.TabIndex = 2
        Me.Label5.Text = "Local Planar Description"
        Me.ToolTip1.SetToolTip(Me.Label5, "a description of the local planar system. ")
        '
        'Label4
        '
        Me.Label4.Dock = System.Windows.Forms.DockStyle.Top
        Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label4.Location = New System.Drawing.Point(0, 0)
        Me.Label4.Name = "Label4"
        Me.Label4.Size = New System.Drawing.Size(285, 23)
        Me.Label4.TabIndex = 1
        Me.Label4.Text = "Local Planar"
        Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        Me.ToolTip1.SetToolTip(Me.Label4, "any right-handed planar coordinate system of which the z-axis coincides with a pl" & _
                "umb line through the origin that locally is aligned with the surface of the Eart" & _
                "h. ")
        '
        'pnlGrid
        '
        Me.pnlGrid.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.pnlGrid.Controls.Add(Me.lboxGrid)
        Me.pnlGrid.Controls.Add(Me.Label20)
        Me.pnlGrid.Controls.Add(Me.btnGrid)
        Me.pnlGrid.Controls.Add(Me.cboxGrid)
        Me.pnlGrid.Controls.Add(Me.Label3)
        Me.pnlGrid.Location = New System.Drawing.Point(21, 160)
        Me.pnlGrid.Name = "pnlGrid"
        Me.pnlGrid.Size = New System.Drawing.Size(240, 179)
        Me.pnlGrid.TabIndex = 9
        Me.ToolTip1.SetToolTip(Me.pnlGrid, "a plane-rectangular coordinate system usually based on," & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "and mathematically adjus" & _
                "ted to," & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "a map projection so that geographic positions can be" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "readily transform" & _
                "ed to and from plane coordinates.")
        '
        'Label20
        '
        Me.Label20.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label20.Location = New System.Drawing.Point(5, 56)
        Me.Label20.Name = "Label20"
        Me.Label20.Size = New System.Drawing.Size(64, 32)
        Me.Label20.TabIndex = 6
        Me.Label20.Text = "Grid Projection"
        Me.ToolTip1.SetToolTip(Me.Label20, "select a projection if options are presented")
        '
        'btnGrid
        '
        Me.btnGrid.Image = CType(resources.GetObject("btnGrid.Image"), System.Drawing.Image)
        Me.btnGrid.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
        Me.btnGrid.Location = New System.Drawing.Point(149, 144)
        Me.btnGrid.Name = "btnGrid"
        Me.btnGrid.Size = New System.Drawing.Size(75, 23)
        Me.btnGrid.TabIndex = 7
        Me.btnGrid.Text = "Edit"
        '
        'cboxGrid
        '
        Me.cboxGrid.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cboxGrid.Items.AddRange(New Object() {"Universal Transverse Mercator", "Universal Polar Stereographic", "State Plane Coordinate System 1927", "State Plane Coordinate System 1983", "ARC Coordinate System", "other grid system"})
        Me.cboxGrid.Location = New System.Drawing.Point(8, 26)
        Me.cboxGrid.Name = "cboxGrid"
        Me.cboxGrid.Size = New System.Drawing.Size(216, 21)
        Me.cboxGrid.TabIndex = 4
        Me.ToolTip1.SetToolTip(Me.cboxGrid, "name of the grid coordinate system. ")
        '
        'Label3
        '
        Me.Label3.Dock = System.Windows.Forms.DockStyle.Top
        Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label3.Location = New System.Drawing.Point(0, 0)
        Me.Label3.Name = "Label3"
        Me.Label3.Size = New System.Drawing.Size(236, 23)
        Me.Label3.TabIndex = 1
        Me.Label3.Text = "Grid Coordinate System"
        Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        Me.ToolTip1.SetToolTip(Me.Label3, "a plane-rectangular coordinate system usually based on," & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "and mathematically adjus" & _
                "ted to," & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "a map projection so that geographic positions can be" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "readily transform" & _
                "ed to and from plane coordinates.")
        '
        'pnlMap
        '
        Me.pnlMap.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.pnlMap.Controls.Add(Me.btnAddMap)
        Me.pnlMap.Controls.Add(Me.btnMap)
        Me.pnlMap.Controls.Add(Me.cboxMap)
        Me.pnlMap.Controls.Add(Me.Label2)
        Me.pnlMap.Location = New System.Drawing.Point(21, 62)
        Me.pnlMap.Name = "pnlMap"
        Me.pnlMap.Size = New System.Drawing.Size(240, 92)
        Me.pnlMap.TabIndex = 8
        Me.ToolTip1.SetToolTip(Me.pnlMap, "the systematic representation of all or part of the surface of the Earth on a pla" & _
                "ne or developable surface. ")
        '
        'btnAddMap
        '
        Me.btnAddMap.Image = Global.MetaDoc.My.Resources.Resources.file_new_16x16
        Me.btnAddMap.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
        Me.btnAddMap.Location = New System.Drawing.Point(68, 51)
        Me.btnAddMap.Name = "btnAddMap"
        Me.btnAddMap.Size = New System.Drawing.Size(75, 23)
        Me.btnAddMap.TabIndex = 2
        Me.btnAddMap.Text = "New"
        '
        'btnMap
        '
        Me.btnMap.Image = CType(resources.GetObject("btnMap.Image"), System.Drawing.Image)
        Me.btnMap.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
        Me.btnMap.Location = New System.Drawing.Point(149, 51)
        Me.btnMap.Name = "btnMap"
        Me.btnMap.Size = New System.Drawing.Size(75, 23)
        Me.btnMap.TabIndex = 3
        Me.btnMap.Text = "Edit"
        '
        'cboxMap
        '
        Me.cboxMap.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cboxMap.Items.AddRange(New Object() {"Albers Conical Equal Area", "Azimuthal Equidistant", "Equidistant Conic", "Equirectangular", "General Vertical Near-sided Projection", "Gnomonic", "Lambert Azimuthal Equal Area", "Lambert Conformal Conic", "Mercator", "Modified Stereographic for Alaska", "Miller Cylindrical", "Oblique Mercator", "Orthographic", "Polar Stereographic", "Polyconic", "Robinson", "Sinusoidal", "Space Oblique Mercator", "Stereographic", "Transverse Mercator", "van der Grinten"})
        Me.cboxMap.Location = New System.Drawing.Point(8, 24)
        Me.cboxMap.Name = "cboxMap"
        Me.cboxMap.Size = New System.Drawing.Size(216, 21)
        Me.cboxMap.TabIndex = 1
        Me.ToolTip1.SetToolTip(Me.cboxMap, "name of the map projection. ")
        '
        'Label2
        '
        Me.Label2.Dock = System.Windows.Forms.DockStyle.Top
        Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label2.Location = New System.Drawing.Point(0, 0)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(236, 23)
        Me.Label2.TabIndex = 0
        Me.Label2.Text = "Map Projection"
        Me.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        Me.ToolTip1.SetToolTip(Me.Label2, "the systematic representation of all or part of the surface of the Earth on a pla" & _
                "ne or developable surface. ")
        '
        'pnlSystem
        '
        Me.pnlSystem.Controls.Add(Me.rdoLocal)
        Me.pnlSystem.Controls.Add(Me.rdoGrid)
        Me.pnlSystem.Controls.Add(Me.rdoMap)
        Me.pnlSystem.Location = New System.Drawing.Point(98, 16)
        Me.pnlSystem.Name = "pnlSystem"
        Me.pnlSystem.Size = New System.Drawing.Size(368, 40)
        Me.pnlSystem.TabIndex = 7
        Me.pnlSystem.TabStop = True
        '
        'rdoLocal
        '
        Me.rdoLocal.Location = New System.Drawing.Point(256, 8)
        Me.rdoLocal.Name = "rdoLocal"
        Me.rdoLocal.Size = New System.Drawing.Size(104, 24)
        Me.rdoLocal.TabIndex = 2
        Me.rdoLocal.TabStop = True
        Me.rdoLocal.Text = "Local Planar"
        Me.ToolTip1.SetToolTip(Me.rdoLocal, "any right-handed planar coordinate system of which the z-axis coincides with a pl" & _
                "umb line through the origin that locally is aligned with the surface of the Eart" & _
                "h. ")
        '
        'rdoGrid
        '
        Me.rdoGrid.Location = New System.Drawing.Point(112, 8)
        Me.rdoGrid.Name = "rdoGrid"
        Me.rdoGrid.Size = New System.Drawing.Size(144, 24)
        Me.rdoGrid.TabIndex = 1
        Me.rdoGrid.TabStop = True
        Me.rdoGrid.Text = "Grid Coordinate System"
        Me.ToolTip1.SetToolTip(Me.rdoGrid, "a plane-rectangular coordinate system usually based on," & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "and mathematically adjus" & _
                "ted to," & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "a map projection so that geographic positions can be" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "readily transform" & _
                "ed to and from plane coordinates.")
        '
        'rdoMap
        '
        Me.rdoMap.Location = New System.Drawing.Point(8, 8)
        Me.rdoMap.Name = "rdoMap"
        Me.rdoMap.Size = New System.Drawing.Size(104, 24)
        Me.rdoMap.TabIndex = 0
        Me.rdoMap.TabStop = True
        Me.rdoMap.Text = "Map Projection"
        Me.ToolTip1.SetToolTip(Me.rdoMap, "the systematic representation of all or part of the surface of the Earth on a pla" & _
                "ne or developable surface. ")
        '
        'Label1
        '
        Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label1.Location = New System.Drawing.Point(18, 25)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(88, 23)
        Me.Label1.TabIndex = 6
        Me.Label1.Text = "System Used"
        Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
        '
        'TabPage2
        '
        Me.TabPage2.AutoScroll = True
        Me.TabPage2.Controls.Add(Me.Button1)
        Me.TabPage2.Controls.Add(Me.btnCancel1)
        Me.TabPage2.Controls.Add(Me.btnOK1)
        Me.TabPage2.Controls.Add(Me.pnlCoord)
        Me.TabPage2.Controls.Add(Me.pnlBearing)
        Me.TabPage2.Controls.Add(Me.cboxPlanUnits)
        Me.TabPage2.Controls.Add(Me.Label9)
        Me.TabPage2.Controls.Add(Me.cboxEncode)
        Me.TabPage2.Controls.Add(Me.Label8)
        Me.TabPage2.ImageIndex = 0
        Me.TabPage2.Location = New System.Drawing.Point(4, 23)
        Me.TabPage2.Name = "TabPage2"
        Me.TabPage2.Size = New System.Drawing.Size(583, 385)
        Me.TabPage2.TabIndex = 1
        Me.TabPage2.Text = "Planar Coordinate Information"
        Me.ToolTip1.SetToolTip(Me.TabPage2, "the quantities of distances, or distances and angles," & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "which define the position " & _
                "of a point on a reference plane" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "to which the surface of the Earth has been proj" & _
                "ected. ")
        '
        'Button1
        '
        Me.Button1.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Button1.Image = Global.MetaDoc.My.Resources.Resources.app_help_48x48
        Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
        Me.Button1.Location = New System.Drawing.Point(465, 3)
        Me.Button1.Name = "Button1"
        Me.Button1.Size = New System.Drawing.Size(110, 48)
        Me.Button1.TabIndex = 22
        Me.Button1.Text = "EXAMPLE"
        Me.Button1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        Me.Button1.UseVisualStyleBackColor = True
        '
        'btnCancel1
        '
        Me.btnCancel1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.btnCancel1.Image = Global.MetaDoc.My.Resources.Resources.Cancel_16x16
        Me.btnCancel1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
        Me.btnCancel1.Location = New System.Drawing.Point(297, 351)
        Me.btnCancel1.Name = "btnCancel1"
        Me.btnCancel1.Size = New System.Drawing.Size(75, 23)
        Me.btnCancel1.TabIndex = 18
        Me.btnCancel1.Text = "Cancel"
        Me.btnCancel1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'btnOK1
        '
        Me.btnOK1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.btnOK1.Image = Global.MetaDoc.My.Resources.Resources.Ok_16x16
        Me.btnOK1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
        Me.btnOK1.Location = New System.Drawing.Point(216, 351)
        Me.btnOK1.Name = "btnOK1"
        Me.btnOK1.Size = New System.Drawing.Size(75, 23)
        Me.btnOK1.TabIndex = 17
        Me.btnOK1.Text = "OK"
        Me.btnOK1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'Label9
        '
        Me.Label9.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label9.Location = New System.Drawing.Point(18, 58)
        Me.Label9.Name = "Label9"
        Me.Label9.Size = New System.Drawing.Size(144, 16)
        Me.Label9.TabIndex = 11
        Me.Label9.Text = "Planar Distance Units"
        Me.ToolTip1.SetToolTip(Me.Label9, "units of measure used for distances." & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "    Domain: ""meters"" ""international feet"" """ & _
                "survey feet"" free text " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10))
        '
        'Label8
        '
        Me.Label8.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label8.Location = New System.Drawing.Point(18, 19)
        Me.Label8.Name = "Label8"
        Me.Label8.Size = New System.Drawing.Size(112, 32)
        Me.Label8.TabIndex = 9
        Me.Label8.Text = "Planar Coordinate Encoding Method"
        Me.ToolTip1.SetToolTip(Me.Label8, "the means used to represent horizontal positions." & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "values: ""coordinate pair"", ""di" & _
                "stance and bearing"", ""row and column""" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10))
        '
        'ImageList1
        '
        Me.ImageList1.ImageStream = CType(resources.GetObject("ImageList1.ImageStream"), System.Windows.Forms.ImageListStreamer)
        Me.ImageList1.TransparentColor = System.Drawing.Color.Transparent
        Me.ImageList1.Images.SetKeyName(0, "field_MAN.png")
        Me.ImageList1.Images.SetKeyName(1, "field_INF.png")
        Me.ImageList1.Images.SetKeyName(2, "")
        Me.ImageList1.Images.SetKeyName(3, "")
        '
        'frmPlanar
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.AutoScroll = True
        Me.ClientSize = New System.Drawing.Size(591, 431)
        Me.ControlBox = False
        Me.Controls.Add(Me.TabControl1)
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
        Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
        Me.Name = "frmPlanar"
        Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        Me.Text = "Planar Coordinate System Definition"
        Me.ToolTip1.SetToolTip(Me, "the quantities of distances, or distances and angles," & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "which define the position " & _
                "of a point on a reference plane" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "to which the surface of the Earth has been proj" & _
                "ected. ")
        Me.pnlCoord.ResumeLayout(False)
        CType(Me.numYRes, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.numXRes, System.ComponentModel.ISupportInitialize).EndInit()
        Me.pnlBearing.ResumeLayout(False)
        CType(Me.numBearRes, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.numDistRes, System.ComponentModel.ISupportInitialize).EndInit()
        Me.TabControl1.ResumeLayout(False)
        Me.TabPage1.ResumeLayout(False)
        Me.pnlLocal.ResumeLayout(False)
        Me.pnlLocal.PerformLayout()
        Me.pnlGrid.ResumeLayout(False)
        Me.pnlMap.ResumeLayout(False)
        Me.pnlSystem.ResumeLayout(False)
        Me.TabPage2.ResumeLayout(False)
        Me.ResumeLayout(False)

    End Sub

#End Region

    Private Sub frmPlanar_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'default set up
        bLoad = True
        bUpdate = False

        bMapProj = oPlanar.MapProj
        bGridSys = oPlanar.GridSys
        bLocalP = oPlanar.LocalPlanar
        bCoord = oPlanar.CoorRep
        bBearing = oPlanar.BearingRep
        sEncode = oPlanar.Encoding

        Dim iCount As Integer = oPlanar.nParams - 1
        Dim iLoop As Integer = 0
        For iLoop = 0 To iCount
            sPvalues(iLoop) = oPlanar.getParam(iLoop)
        Next
        rdoMap.Checked = False
        rdoGrid.Checked = False
        rdoLocal.Checked = False
        pnlMap.Enabled = False
        pnlGrid.Enabled = False
        pnlLocal.Enabled = False

        'fill in the form if editing Planar object
        Dim s1 As String = ""
        Dim iSelIndex As Integer = -1 'selected index of Map or Grid combo box
        If (bMapProj = True) Then
            rdoMap.Checked = True
            pnlMap.Enabled = True
            s1 = sPvalues(0)
            iSelIndex = cboxMap.FindStringExact(s1)
            If (iSelIndex = -1) Then
                If (s1 = "") Then
                    'do nothing
                Else
                    cboxMap.Items.Add(s1)
                    cboxMap.SelectedIndex = cboxMap.Items.Count - 1
                End If
            Else
                cboxMap.SelectedIndex = iSelIndex
            End If
        ElseIf (bGridSys = True) Then
            rdoGrid.Checked = True
            pnlGrid.Enabled = True
            'set the Grid System
            s1 = sPvalues(0)
            iSelIndex = cboxGrid.FindStringExact(s1)
            If (iSelIndex = -1) Then
                If (s1 = "") Then
                    'do nothing
                Else
                    s1 = "Grid System: " & s1 & " not found." & CrLf & "'other grid system' selected by default"
                    MessageBox.Show(s1, "Grid system error", MessageBoxButtons.OK, MessageBoxIcon.Error)
                    cboxGrid.SelectedIndex = cboxGrid.Items.Count - 1 'other grid system is last entry in list box
                End If
            Else
                cboxGrid.SelectedIndex = iSelIndex
            End If

            'set the Grid System Projection
            s1 = sPvalues(1)
            iSelIndex = lboxGrid.FindStringExact(s1)
            If (iSelIndex = -1) Then
                If (s1 = "") Then
                    'do nothing
                Else
                    s1 = "Grid Projection: " & s1 & " not found." & CrLf & "Reset to no choice."
                    MessageBox.Show(s1, "Grid projection error", MessageBoxButtons.OK, MessageBoxIcon.Error)
                    lboxGrid.SelectedIndex = -1
                End If
            Else
                lboxGrid.SelectedIndex = iSelIndex
            End If
        ElseIf (bLocalP = True) Then
            rdoLocal.Checked = True
            pnlLocal.Enabled = True
            txtLocalDesc.Text = oPlanar.LocalDesc
            txtGeoRef.Text = oPlanar.LocalGeoRef
        End If

        'set up Planar Coordinate Info
        Dim iPlanarIndex As Integer = 0
        s1 = oPlanar.Encoding 'Planar Coordinate Encoding Method
        iPlanarIndex = cboxEncode.FindStringExact(s1)
        If (iPlanarIndex = -1) Then
            If (s1 = "") Then
                'do nothing
            Else
                s1 = "Encoding Method: " & s1 & " not found." & CrLf & "Reset to no choice."
                MessageBox.Show(s1, "Encoding Method error", MessageBoxButtons.OK, MessageBoxIcon.Error)
                cboxEncode.SelectedIndex = -1
            End If
        Else
            cboxEncode.SelectedIndex = iPlanarIndex
        End If
        s1 = oPlanar.PlanarUnits 'Planar Distance Units
        iSelIndex = cboxPlanUnits.FindStringExact(s1)
        If (iSelIndex = -1) Then
            If (s1 = "") Then
                'do nothing
            Else
                cboxPlanUnits.Items.Add(s1)
                cboxPlanUnits.SelectedIndex = cboxPlanUnits.Items.Count - 1
            End If
        Else
            cboxPlanUnits.SelectedIndex = iSelIndex
        End If
        'set up Representation
        pnlCoord.Enabled = False
        pnlBearing.Enabled = False
        If (bCoord = True) Then
            pnlCoord.Enabled = True
            numXRes.Value = oPlanar.Abscissa 'set Abscissa Resolution
            numYRes.Value = oPlanar.Ordinate 'set Ordinate Resolution
        ElseIf (bBearing = True) Then
            pnlBearing.Enabled = True
            numDistRes.Value = oPlanar.DistanceRes 'set Distance Resolution
            numBearRes.Value = oPlanar.BearingRes 'set Bearing Resolution
            'set Bearing Units
            s1 = oPlanar.BearingUnits
            iPlanarIndex = cboxBearUnits.FindStringExact(s1)
            If (iPlanarIndex = -1) Then
                If (s1 = "") Then
                    'do nothing
                Else
                    s1 = "Bearing Units: " & s1 & " not found." & CrLf & "Reset to no choice."
                    MessageBox.Show(s1, "Bearing Units error", MessageBoxButtons.OK, MessageBoxIcon.Error)
                    cboxBearUnits.SelectedIndex = -1
                End If
            Else
                cboxBearUnits.SelectedIndex = iPlanarIndex
            End If
            'set Bearing Reference Direction
            s1 = oPlanar.BearingDir
            iPlanarIndex = cboxBearDir.FindStringExact(s1)
            If (iPlanarIndex = -1) Then
                If (s1 = "") Then
                    'do nothing
                Else
                    s1 = "Reference Direction: " & s1 & " not found." & CrLf & "Reset to no choice."
                    MessageBox.Show(s1, "Bearing Reference Direction error", MessageBoxButtons.OK, MessageBoxIcon.Error)
                    cboxBearDir.SelectedIndex = -1
                End If
            Else
                cboxBearDir.SelectedIndex = iPlanarIndex
            End If
            'set Bearing Reference Meridian
            s1 = oPlanar.BearingMerid
            iPlanarIndex = cboxMerid.FindStringExact(s1)
            If (iPlanarIndex = -1) Then
                If (s1 = "") Then
                    'do nothing
                Else
                    s1 = "Reference Meridian: " & s1 & " not found." & CrLf & "Reset to no choice."
                    MessageBox.Show(s1, "Bearing Reference Meridian error", MessageBoxButtons.OK, MessageBoxIcon.Error)
                    cboxMerid.SelectedIndex = -1
                End If
            Else
                cboxMerid.SelectedIndex = iPlanarIndex
            End If
        End If
        bLoad = False
    End Sub

    Private Sub rdoMap_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rdoMap.CheckedChanged
        If (bLoad = True) Then Return
        If (rdoMap.Checked = True) Then
            pnlMap.Enabled = True
            bMapProj = True
            sPvalues(0) = ""
            sPvalues(1) = ""
        Else
            pnlMap.Enabled = False
            bMapProj = False
        End If
    End Sub

    Private Sub rdoGrid_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rdoGrid.CheckedChanged
        If (bLoad = True) Then Return
        If (rdoGrid.Checked = True) Then
            pnlGrid.Enabled = True
            bGridSys = True
            sPvalues(0) = ""
            sPvalues(1) = ""
        Else
            pnlGrid.Enabled = False
            bGridSys = False
        End If
    End Sub

    Private Sub rdoLocal_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rdoLocal.CheckedChanged
        If (rdoLocal.Checked = True) Then
            pnlLocal.Enabled = True
            bLocalP = True
        Else
            pnlLocal.Enabled = False
            bLocalP = False
        End If
    End Sub

    Private Sub cboxMap_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboxMap.SelectedIndexChanged
        sPvalues(0) = cboxMap.Text
        sPvalues(1) = ""
        If (bLoad = False) Then bMapChange = True
    End Sub

    Private Sub btnAddMap_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAddMap.Click
        Dim s1 As String = ""
        Dim iSelIndex As Integer = -1
        Dim frmAddMap As New frmPlanarAddMap
        frmAddMap.ShowDialog()
        If (frmAddMap.bUpdate = True) Then
            s1 = frmAddMap.sNewName
            iSelIndex = cboxMap.FindStringExact(s1)
            If (iSelIndex = -1) Then
                cboxMap.Items.Add(s1)
                cboxMap.SelectedIndex = cboxMap.Items.Count - 1
            Else
                cboxMap.SelectedIndex = iSelIndex
            End If
        End If
    End Sub

    Private Sub btnMap_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMap.Click
        'make sure that Map Projection is not blank!
        Dim sMap As String = sPvalues(0)
        If (sMap = "") Then
            sMap = cboxMap.Text
            If (sMap = "") Then
                sMap = "Please specify a map projection."
                MessageBox.Show(sMap, "Error in selecting parameters to enter", MessageBoxButtons.OK, MessageBoxIcon.Error)
                Return
            Else
                sPvalues(0) = sMap
            End If
        End If
        'call up the parameter entry window
        Dim s1 As String = ""
        Dim iCount As Integer = oPlanar.nParams
        Dim iLoop As Integer = 0
        Dim frmMapPs As New frmPlanarParams(sPvalues)
        frmMapPs.ShowDialog()
        If (frmMapPs.bUpdate = True) Then
            'update the parameter array
            For iLoop = 0 To iCount - 1
                sPvalues(iLoop) = frmMapPs.sParArray(iLoop)
            Next
            bMapChange = False
        End If
    End Sub

    Private Sub cboxGrid_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboxGrid.SelectedIndexChanged
        Dim s1 As String = cboxGrid.Text
        sPvalues(0) = s1
        lboxGrid.Items.Clear()
        Select Case s1
            Case "Universal Transverse Mercator"
                lboxGrid.Items.Add("Transverse Mercator")
                lboxGrid.SelectedIndex = 0
            Case "Universal Polar Stereographic"
                lboxGrid.Items.Add("Polar Stereographic")
                lboxGrid.SelectedIndex = 0
            Case "State Plane Coordinate System 1927", "State Plane Coordinate System 1983"
                lboxGrid.Items.Add("Lambert Conformal Conic")
                lboxGrid.Items.Add("Transverse Mercator")
                lboxGrid.Items.Add("Oblique Mercator")
                lboxGrid.Items.Add("Polyconic")
                lboxGrid.SelectedIndex = -1
            Case "ARC Coordinate System"
                lboxGrid.Items.Add("Equirectangular")
                lboxGrid.Items.Add("Azimuthal Equidistant")
                lboxGrid.SelectedIndex = -1
            Case Else
                'do nothing: other grid system
        End Select
        If (bLoad = False) Then bGridChange = True
    End Sub

    Private Sub lboxGrid_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lboxGrid.SelectedIndexChanged
        sPvalues(1) = lboxGrid.Text
        If (bLoad = False) Then bGridChange = True
    End Sub

    Private Sub btnGrid_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGrid.Click
        'make sure that Grid System is not blank!
        Dim sMap As String = sPvalues(0)
        If (sMap = "") Then
            sMap = "Please specify a grid system."
            MessageBox.Show(sMap, "Error in selecting parameters to enter", MessageBoxButtons.OK, MessageBoxIcon.Error)
            Return
        End If
        'make sure that grid projection is selected if needed
        If (sMap = "other grid system") Then
            sPvalues(1) = ""
            'continue processing
        Else
            'update the selected projection
            If (lboxGrid.SelectedIndex = -1) Then
                sMap = "Please specify a grid projection."
                MessageBox.Show(sMap, "Error in selecting parameters to enter", MessageBoxButtons.OK, MessageBoxIcon.Error)
                Return
            Else
                sPvalues(1) = CType(lboxGrid.SelectedItem, String)
            End If
        End If
        'call up the parameter entry window
        Dim iCount As Integer = oPlanar.nParams
        Dim iLoop As Integer = 0
        Dim frmGridPs As New frmPlanarParams(sPvalues)
        frmGridPs.ShowDialog()
        If (frmGridPs.bUpdate = True) Then
            For iLoop = 0 To iCount - 1
                sPvalues(iLoop) = frmGridPs.sParArray(iLoop)
            Next
            bGridChange = False
        End If
    End Sub

    Private Sub cboxEncode_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboxEncode.SelectedIndexChanged
        Dim iSelIndex As Integer = cboxEncode.SelectedIndex
        sEncode = cboxEncode.Text
        Select Case iSelIndex
            Case 0, 2
                pnlCoord.Enabled = True
                bCoord = True
                pnlBearing.Enabled = False
                bBearing = False
            Case 1
                pnlBearing.Enabled = True
                bBearing = True
                pnlCoord.Enabled = False
                bCoord = False
        End Select
    End Sub

    Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
        'check the form for complete data
        Dim bReady As Boolean = True
        checkComplete(bReady)
        If (bReady = False) Then Return

        'Complete data ready, so update the object
        oPlanar.MapProj = bMapProj
        oPlanar.GridSys = bGridSys
        oPlanar.LocalPlanar = bLocalP
        oPlanar.CoorRep = bCoord
        oPlanar.BearingRep = bBearing

        Dim iCount As Integer = oPlanar.nParams - 1
        Dim iLoop As Integer = 0
        If (bMapProj = True Or bGridSys = True) Then
            'if Map Projection or Grid Coordinate System, need to update parameter array
            For iLoop = 0 To iCount
                oPlanar.setParam(iLoop, sPvalues(iLoop))
            Next
        Else
            'Local Planar:
            oPlanar.LocalDesc = txtLocalDesc.Text
            oPlanar.LocalGeoRef = txtGeoRef.Text
        End If

        'Planar Coordinate Information
        oPlanar.Encoding = cboxEncode.Text

        'Coordinate Representation
        If (oPlanar.CoorRep = True) Then
            oPlanar.Abscissa = numXRes.Value
            oPlanar.Ordinate = numYRes.Value
        End If

        'Distance and Bearing Representation
        If (oPlanar.BearingRep = True) Then
            oPlanar.DistanceRes = numDistRes.Value
            oPlanar.BearingRes = numBearRes.Value
            oPlanar.BearingUnits = cboxBearUnits.Text
            oPlanar.BearingDir = cboxBearDir.Text
            oPlanar.BearingMerid = cboxMerid.Text
        End If

        'Planar Distance Units
        oPlanar.PlanarUnits = cboxPlanUnits.Text

        bUpdate = True
        Me.Close()
    End Sub

    Private Sub checkComplete(ByRef bReady As Boolean)
        Dim sError As String = ""
        bUpdate = False

        'need to check that a system is selected: Map, Grid, Local
        If (rdoMap.Checked = True Or rdoGrid.Checked = True Or rdoLocal.Checked = True) Then
            'so far okay
        Else
            sError = "A Map, Grid, or Local system needs to be chosen and described."
            MessageBox.Show(sError, "Specification error", MessageBoxButtons.OK, MessageBoxIcon.Error)
            bReady = False
            Return
        End If

        'if Map, need to make sure a projection system has been chosen
        'if projection system chosen, make sure parameters have been updated
        If (bMapProj = True) Then
            If (sPvalues(0) = "") Then
                sError = "A Map Projection system needs to be chosen and described."
                MessageBox.Show(sError, "Specification error", MessageBoxButtons.OK, MessageBoxIcon.Error)
                bReady = False
                Return
            End If
            If (bMapChange = True) Then
                sError = "You have changed the Map Projection." & CrLf & "Parameters need to be updated!"
                MessageBox.Show(sError, "Specification error", MessageBoxButtons.OK, MessageBoxIcon.Error)
                bReady = False
                Return
            End If
        End If

        'if Grid, need to make sure a congruent projection is selected and parameters updated
        If (bGridSys = True) Then
            If (sPvalues(0) = "") Then
                sError = "A Grid Coordinate System needs to be chosen and described."
                MessageBox.Show(sError, "Specification error", MessageBoxButtons.OK, MessageBoxIcon.Error)
                bReady = False
                Return
            End If
            If (lboxGrid.Items.Count = 0) Then
                'other grid system
            Else
                If (lboxGrid.SelectedIndex = -1) Then
                    sError = "A projection needs to be chosen and described for the Grid system."
                    MessageBox.Show(sError, "Specification error", MessageBoxButtons.OK, MessageBoxIcon.Error)
                    bReady = False
                    Return
                End If
            End If
            If (bGridChange = True) Then
                sError = "You have changed the Grid projection." & CrLf & "Parameters need to be updated."
                MessageBox.Show(sError, "Specification error", MessageBoxButtons.OK, MessageBoxIcon.Error)
                bReady = False
                Return
            End If
        End If

        'if Local, check for entries in text boxes
        If (bLocalP = True) Then
            If (txtLocalDesc.Text = "" Or txtGeoRef.Text = "") Then
                sError = "Local Planar information is incomplete."
                MessageBox.Show(sError, "Specification error", MessageBoxButtons.OK, MessageBoxIcon.Error)
                bReady = False
                Return
            End If
        End If

        'check that the encoding system is selected
        If (cboxEncode.SelectedIndex = -1) Then
            sError = "Planar Coordinate Encoding needs to be chosen."
            MessageBox.Show(sError, "Specification error", MessageBoxButtons.OK, MessageBoxIcon.Error)
            bReady = False
            Return
        End If

        'check that the distance unit is selected
        If (cboxPlanUnits.Text = "") Then
            sError = "Planar Distance Units needs to be specified."
            MessageBox.Show(sError, "Specification error", MessageBoxButtons.OK, MessageBoxIcon.Error)
            bReady = False
            Return
        End If

        'check representation system description
        If (bCoord = True) Then
            If (numXRes.Value = 0.0 Or numYRes.Value = 0.0) Then
                sError = "Coordinate Representation:" & "  resolution specification is incomplete."
                MessageBox.Show(sError, "Specification error", MessageBoxButtons.OK, MessageBoxIcon.Error)
                bReady = False
                Return
            End If
        ElseIf (bBearing = True) Then
            If (numDistRes.Value = 0.0 Or numBearRes.Value = 0.0) Then
                sError = "Distance and Bearing Representation:" & "  resolution specification is incomplete."
                MessageBox.Show(sError, "Specification error", MessageBoxButtons.OK, MessageBoxIcon.Error)
                bReady = False
                Return
            End If
            If (cboxBearUnits.SelectedIndex = -1) Then
                sError = "Distance and Bearing Representation:" & "  bearing units is not specified."
                MessageBox.Show(sError, "Specification error", MessageBoxButtons.OK, MessageBoxIcon.Error)
                bReady = False
                Return
            End If
            If (cboxBearDir.SelectedIndex = -1 Or cboxMerid.SelectedIndex = -1) Then
                sError = "Distance and Bearing Representation:" & "  bearing reference specification is incomplete."
                MessageBox.Show(sError, "Specification error", MessageBoxButtons.OK, MessageBoxIcon.Error)
                bReady = False
                Return
            End If
        Else
            sError = "Selection of representation based on encoding choice failed."
            MessageBox.Show(sError, "Programming error!!", MessageBoxButtons.OK, MessageBoxIcon.Error)
            bReady = False
            Return
        End If
    End Sub

    Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
        bUpdate = False
        Me.Close()
    End Sub

    Public Function getUpdated() As Boolean
        Return bUpdate
    End Function

    Public Function getPlanar() As PlanarClass
        Return oPlanar
    End Function

    Private Sub btnOK2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        btnOK_Click(sender, e)
    End Sub

    Private Sub btnCancel2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        btnCancel_Click(sender, e)
    End Sub

    Private Sub btnOK1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK1.Click
        btnOK_Click(sender, e)
    End Sub

    Private Sub btnCancel1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel1.Click
        btnCancel_Click(sender, e)
    End Sub

    Private Sub button_example_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button_example.Click
        Dim helpForm As dialog_help = New dialog_help("Planar")
        helpForm.ShowDialog()
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        button_example_Click(sender, e)
    End Sub

    Private Sub TabPage2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TabPage2.Click

    End Sub

End Class
